# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
# Maintainer: Wolfgang Fischer <wdev@posteo.org>
pkgname=step-kms-plugin
pkgver=0.11.6
pkgrel=0
pkgdesc="Step plugin to manage keys and certs on KMSs and HSMs"
url="https://github.com/smallstep/step-kms-plugin"
arch="all"
license="Apache-2.0"
makedepends="
	go
	pcsc-lite-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/smallstep/step-kms-plugin/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make VERSION=$pkgver build
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
84850e218fa31b6a389b91b99826ea836aa482013d771b4cac766b8d7fd7ca346d9d3332f3c72c106046d5b78fa4e9ec44ec36af7b1b724a1ac4e2457a7863ff  step-kms-plugin-0.11.6.tar.gz
"
